<?php
// +----------------------------------------------------------------------
// | 文件目录：D:\information\phone-bill-interface-main\app\Models
// +----------------------------------------------------------------------
// | 文件名：CardModel.php
// +----------------------------------------------------------------------
// | 文件路径：D:\information\phone-bill-interface-main\app\Models\CardModel.php
// +----------------------------------------------------------------------
// | 文件功能： 话费兑换券模型
// +----------------------------------------------------------------------
// | 作者：李星星
// +----------------------------------------------------------------------
// | 创建时间：2025-05-15 14:00:03
// +----------------------------------------------------------------------
namespace App\Models;

use App\Enum\CardRecordCode;

class CardModel extends BaseModel
{
    protected $table = 'hf_card_record';

    protected $primaryKey = 'record_id';

    protected $fillable = [
        'status',
        'phone',
        'product_id',
        'card_uuid',
        'get_time',
        'use_time',
        'due_time',
        'remaining_num',
        'total_num'
    ];

    protected $attributes = [
        'status' => CardRecordCode::DEFAULT_CODE
    ];

    protected $casts = [
        'created_at' => 'datetime:Y-m-d',
        'updated_at' => 'datetime:Y-m-d',
        'get_time' => 'datetime:Y-m-d',
        'use_time' => 'datetime:Y-m-d'
    ];
}
